<div class="table1">
<form method="post" name="backup" action="{U_ACTION}" enctype="multipart/form-data">
	<div style="float:left;margin-right:2em">
		<select name="tablelist[]" size="20" multiple="multiple">
			<!-- BEGIN tables -->
			<option value="{tables.S_NAME}">{tables.S_NAME}</option>
			<!-- END tables -->
		</select>
		<br/><br/>
		<script type="text/javascript">/*<![CDATA[*/
		  function admin_database(value) {
		   if (value == 'BackupDB') {
			$('backuptasks').style.display = '';
			$('installertasks').style.display = 'none';
			return;
		   }
		   if (value == 'Installer') {
			$('backuptasks').style.display = 'none';
			$('installertasks').style.display = '';
			return;
		   }
		   $('backuptasks').style.display = 'none';
		   $('installertasks').style.display = 'none';
		   return;
		  }
		/*]]>*/</script>
		<select name="mode" id="mode" onchange="admin_database(this.options[this.selectedIndex].value)">
			<option value="AnalyzeDB">Analyze</option>
			<option value="BackupDB" selected="selected">L_(SAVEDATABASE)</option>
			<option value="CheckDB">Check</option>
			<option value="OptimizeDB">Optimize</option>
			<option value="RepairDB">Repair</option>
			<option value="StatusDB">Status</option>
			<option value="Synch">Synch core data</option>
			<option value="Installer">XML installer</option>
		</select>
		<br />
		<div id="backuptasks">
			<label style="margin:0.2em 0"><input type="checkbox" value="1" name="dbdata" checked="checked" style="margin-left: 10px;" /> Save Data</label><br />
			<label style="margin:0.2em 0"><input type="checkbox" value="1" name="dbstruct" checked="checked" style="margin-left: 10px;" /> Include CREATE statement</label><br />
			<label style="margin:0.2em 0"><input type="checkbox" value="1" name="drop" checked="checked" style="margin-left: 10px;" /> Include DROP statement</label><br />
			<!-- IF ZLIB --><label style="margin:0.5em 0"><input type="checkbox" value="1" name="gzip" checked="checked" style="margin-left: 10px;" /> Use GZIP compression</label>
			<!-- ELSE -->GZIP Compression not supported<!-- ENDIF -->
		</div>
		<div id="installertasks" style="display:none">
			<label style="margin:0.2em 0"><input type="checkbox" value="1" name="inst_structure" checked="checked" style="margin-left: 10px;" /> Structure</label><br />
			<label style="margin:0.2em 0"><input type="checkbox" value="0" name="inst_data" style="margin-left: 10px;" /> Data</label><br />
			<div style="margin-left: 30px;">
				<input type="checkbox" value="ON-EMPTY" name="inst_datamode"/> Insert only when empty<br />
				or <select name="inst_onduplicate">
					<option value="IGNORE">Ignore</option>
					<option value="ERROR">Error</option>
					<option value="UPDATE">Update</option>
				</select> when exists
			</div>
			<!-- IF ZLIB --><label style="margin:0.2em 0"><input type="checkbox" value="1" name="inst_gzip" checked="checked" style="margin-left: 10px;" /> GZIP compression</label>
			<!-- ELSE -->GZIP Compression not supported<!-- ENDIF -->
		</div>
		<button type="submit">L_(GO)</button>
		<br/>
	</div>

	<div>
		<div style="text-align:center;"><strong>CAUTION</strong></div>
		<br />
		<div style="text-align:justify">Should be used if you have deleted a large part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB, or TEXT columns). Deleted records are maintained in a linked list and subsequent INSERT operations reuse old record positions. You can use OPTIMIZE to reclaim the unused space and to defragment the datafile.
		<br />In most setups you don't have to run OPTIMIZE at all. Even if you do a lot of updates to variable length rows it's not likely that you need to do this more than once a month/week and only on certain tables.</div>
		<br /><strong>Optimize:</strong>
		<ul>
			<li>If the table has deleted or split rows, repair the table.</li>
			<li>If the index pages are not sorted, sort them.</li>
			<li>If the statistics are not up to date (and the repair couldn't be done by sorting the index), update them.</li>
		</ul>
		Please note, the table is locked during the time in which OPTIMIZE is running!
		<br /><br />
		<hr /><strong>Installer:</strong> for developer only, create a backup using our installer type format.
		<br /><br />
		<hr /><strong>Synch data:</strong> Before you synchronize core data, you need to make sure that data files are compatible with your current table structure that you want to synch.<br />
	</div>
</form>

<form method="post" action="{U_ACTION}" name="restore" enctype="multipart/form-data" style="clear:both;padding-top:1em">
	<fieldset>
		<legend>Import SQL File</legend>
		<input type="file" name="sqlfile"/>
		<input type="hidden" name="mode" value="RestoreDB" />
		<button type="submit">Import</button>
	</fieldset>
</form>

</div>
